const conn = require('../../db');
const router = require('express').Router();
router.get('/textbook', (req, res) => {
    let sql = 'select textbook,t_tag from textbook';
    conn.query(sql, (err, data) => {
       
        if (err) {
            res.json({
                "code": 201,
                "msg": "错误"
            })
        } else {
            res.json({
                "code": "200",
                "data": data
            })
            
        }

    })
})
module.exports = router